package test_achieve.h5;

import constant.Constant;
import cucumber.api.java.en.And;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.chrome.ChromeDriver;
import util.tools.CommonTools;

import java.util.concurrent.TimeUnit;

/**
 * H5端下单业务相关代码实现层
 */
public class OrderMain {
    @Given("^h未登录进入下单页面$")
    public void h未登录进入下单页面() throws Throwable {
//        System.setProperty("webdriver.firefox.bin", "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
//        Constant.driverWeb = new FirefoxDriver();
        System.setProperty("webdriver.chrome.driver", "C:\\chromedriver.exe");
        Constant.driverH = new ChromeDriver();
        Constant.driverH.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
        Constant.driverH.get(Constant.h5MakeOrderURL);
    }

    @Given("^h点击物品从哪里寄出$")
    public void h点击物品从哪里寄出() throws Throwable {
//        Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/div/div[3]/div[1]/div")).click();
        Constant.driverH.findElement(By.cssSelector("div.addr-mess")).click();
    }
    @Given("^h点击选择城市图标$")
    public void h点击选择城市图标() throws Throwable {
        Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/section/div/div/a[1]/span[2]")).click();
    }
    @Given("^h选择城市:(.+)$")
    public void h选择城市(String city ) throws Throwable {
        Thread.sleep(2000);
        if("北京市".equals(city)){
            Constant.driverH.findElements(By.xpath("//*[text()=\""+city+"\"]")).get(1).click();
        }else{
            Constant.driverH.findElement(By.xpath("//*[text()=\""+city+"\"]")).click();
        }

    }
    @Given("^h设置收寄件地址信息:(.+)$")
    public void h设置收寄件地址信息(String fAdr ) throws Throwable {
        //输入寄件地址
//        Constant.driverH.findElement(
//                By.xpath("//*[@id=\"iss-app\"]/div/section/div/div/input")).sendKeys(fAdr);
        Constant.driverH.findElement(
                By.cssSelector("input[class='input inputAddress']")).sendKeys(fAdr);
        Thread.sleep(2000);
        //选择第一个
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/section/div/ul/li[1]/div/span")).click();

        //输入楼层/门牌号
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/section/div[1]/div[2]/input")).sendKeys("BC666");
    }
    @Given("^h设置收寄件人信息:(.+)$")
    public void h设置收寄件人信息(String tel ) throws Throwable {
//        PubTools.waitForPageLoadByXpath(Constant.driverH,"//*[@id=\"iss-app\"]/div/section/div[1]/div[3]/div[1]/input");
        Thread.sleep(1000);
        //输入收寄件人姓名
        if(CommonTools.isElementExist(Constant.driverH, By.cssSelector("input[placeholder='寄件人']"))){
            Constant.driverH.findElement(
                    By.cssSelector("input[placeholder='寄件人']")).sendKeys("Benchi");
        }else{
            Constant.driverH.findElement(
                    By.cssSelector("input[placeholder='收件人']")).sendKeys("Benchi");
        }

        //输入寄件人手机
        Constant.driverH.findElement(
                By.cssSelector("input[placeholder='联系电话']")).sendKeys(tel);
    }
    @Given("^h点击物品送到哪里去$")
    public void h点击物品送到哪里去() throws Throwable {
        Constant.driverH.findElement(By.cssSelector("div.addr-mess")).click();
    }

    @Given("^h点击确定$")
    public void h点击确定() throws Throwable {
        //输入寄件人姓名
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/section/div[2]/a")).click();
    }

    @Given("^h填写物品类型:(.+)$")
    public void h填写物品类型(String type) throws Throwable {
        //输入物品类型(无标签类型，等h5标签类型上线后 干掉该代码，用下面注释的代码)
//         Constant.driverH.findElement(
//                By.xpath("//*[@id=\"iss-app\"]/div/div/div[4]/div[1]/input")).sendKeys(type);

        Constant.driverH.findElement(
                By.cssSelector("span.weight-info.goods-type-info")).click();
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/ul/li[3]/span")).click();
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div/button")).click();
        //回到下单页后，下拉滚动条，便于其他元素全部显示出来，为后续操作提供方便  (拉到 ‘我要加价’出现)
        CommonTools.scrollToElement(Constant.driverH,By.cssSelector("span.text-mess"));

    }
    @Given("^h填写物品类型与备注:(.+)：(.+)$")
    public void h填写物品类型与备注(String type,String memo) throws Throwable {
         Constant.driverH.findElement(
                By.cssSelector("span.weight-info.goods-type-info")).click();
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/ul/li[3]/span")).click();
        Constant.driverH.findElement(//输入备注信息
                By.cssSelector("textarea.remark-text")).sendKeys(memo);
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div/button")).click();
        //回到下单页后，下拉滚动条，便于其他元素全部显示出来，为后续操作提供方便  (拉到 ‘我要加价’出现)
        CommonTools.scrollToElement(Constant.driverH,By.cssSelector("span.text-mess"));

    }
    @Given("^h点击下一步$")
    public void h点击下一步() throws Throwable {
        Thread.sleep(1000);
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div[2]/button")).click();
    }
    @Given("^h点击去支付$")
    public void h点击去支付() throws Throwable {
        Thread.sleep(1000);
        CommonTools.waitElementLoad(Constant.driverH,"xpath","//*[@id=\"iss-app\"]/div/div[3]/button");
         Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div[3]/button")).click();

    }

    @Given("^h回到首页$")
    public void h回到首页() throws Throwable {
        Constant.driverH.findElement(
                        By.linkText("回到首页")).click();
    }

    @And("^h点击个人中心图标$")
    public void h点击个人中心图标() throws Throwable {
        CommonTools.waitElementLoad(Constant.driverH,"xpath","//*[@id=\"iss-app\"]/div/div/div[1]/img");
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div/div[1]/img")).click();
    }
    @And("^h点击退出登录$")
    public void h点击退出登录() throws Throwable {
        Constant.driverH.findElement(
                By.cssSelector("font[data-reactid='.0.0.2.0']")).click();
    }

    @When("^h点击交易明细$")
    public void h点击交易明细() throws Throwable {
        Constant.driverH.findElement(
                By.linkText("交易明细")).click();
    }
    @When("^h点击交易明细记录:(.+)$")
    public void h点击交易明细记录(String s) throws Throwable {
        Constant.driverH.findElement(
                By.linkText(s)).click();
    }
    @Then("^h验证闪送余额:(\\d+)$")
    public void h验证闪送余额(int p) throws Throwable {
        int account = Integer.parseInt(
                Constant.driverH.findElement(
                        By.xpath("//*[@id=\"subcard-balance\"]/b")).getText());
        Assert.assertTrue(account==(Constant.h5Account-p));
    }
    @Then("^h验证消费记录:(.+)$")
    public void h验证消费记录(String p) throws Throwable {
       String record = Constant.driverH.findElement(
                        By.cssSelector("span[data-reactid='.0.1.$0.0']")).getText();
//        System.out.println(record);
        Assert.assertTrue(record.contains(p));
    }
    @Then("^h验证充值记录:(.+)$")
    public void  h验证充值记录(String p) throws Throwable {
        Thread.sleep(2000);
        String record = Constant.driverH.findElement(
                By.cssSelector("span[data-reactid='.0.1.$1.0']")).getText();
//        System.out.println("充值记录"+record);
        Assert.assertTrue(record.contains(p));
    }
    @Then("^h验证退款记录:(.+)$")
    public void h验证消费记录h验证退款记录(String p) throws Throwable {
        Thread.sleep(2000);
        String record = Constant.driverH.findElement(
                By.cssSelector("span[data-reactid='.0.1.$1.0']")).getText();
//        System.out.println("退款记录"+record);
        Assert.assertTrue(record.contains(p));
    }

    @And("^h点击我的订单$")
    public void h点击我的订单() throws Throwable {
        Constant.driverH.findElement(
                By.linkText("我的订单")).click();
    }
    @And("^h获得订单号$")
    public void h获得订单号() throws Throwable {
      Constant.OrderNumbuter.add(Constant.driverH.findElement(
              By.xpath("//*[@id=\"body\"]/div/ul/li[1]/div/div[1]/div[1]/span[1]")).getText());
      System.out.println("订单号："+Constant.driverH.findElement(
              By.xpath("//*[@id=\"body\"]/div/ul/li[1]/div/div[1]/div[1]/span[1]")).getText());
     }


    @And("^h取消订单$")
    public void h取消订单() throws Throwable {
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"body\"]/div/ul/li[1]/div/div[2]/button")).click();
        Thread.sleep(1000);
        //弹出窗口点击确定

        Boolean b=CommonTools.isElementExist(Constant.driverH,By.linkText("确定"));
        if(b){
            Constant.driverH.findElement(
                    By.linkText("确定")).click();
        }else {
            Constant.driverH.findElement(
                    By.xpath("/html/body/div[3]/div/div/span[2]")).click();
        }
    }
    @And("^h获取闪送余额$")
    public void h获取闪送余额() throws Throwable {
        CommonTools.waitElementLoad(Constant.driverH,"xpath","//*[@id=\"subcard-balance\"]/b");
        Thread.sleep(1000);
        Constant.h5Account = Float.parseFloat(
            Constant.driverH.findElement(
                By.xpath("//*[@id=\"subcard-balance\"]/b")).getText());
        System.out.println("h获取闪送余额:"+Constant.h5Account);
    }
    @And("^h回退上一页:(\\d+)$")
    public void h回退上一页(int i) throws Throwable {
       CommonTools.back(Constant.driverH,i);
    }
    @And("^h点击订单金额详情$")
    public void h点击订单金额详情() throws Throwable {
        Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div[2]/div/div[2]/span[3]")).click();
    }
    @And("^h点击我要加价$")
    public void h点击我要加价() throws Throwable {

       // 滚动到元素可见的位置
        CommonTools.scrollToElement(Constant.driverH,
                By.cssSelector("span.text-mess"));

        Constant.driverH.findElements(
                By.cssSelector("span.text-mess")).get(1).click();
    }

    @Given("^h点击取件时间$")
    public void h点击取件时间() throws Throwable {
        Constant.driverH.findElement(By.cssSelector("span.fetch-time-input")).click();
    }


    @And("^h进入订单详情$")
    public void h进入订单详情() throws Throwable {
        Thread.sleep(1000);
        Constant.driverH.findElement(By.xpath("//*[@id=\"body\"]/div/ul/li[1]/div/div[1]/div[1]/span[1]")).click();

    }
    @And("^h点击加价$")
    public void h点击加价() throws Throwable {
        Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/div[2]/div[2]/div[2]/div/div[2]/div/button[2]")).click();
    }
    @And("^h设置加价重推金额:(\\d+)$")
    public void h设置加价金额(int addPrice) throws Throwable {

        //真正起作用的js，把value值设置为加价的金额
        String js2="document.getElementsByClassName('active')[0].setAttribute(\"value\","+addPrice+");";
        ((JavascriptExecutor)Constant.driverH).executeScript(js2);
        //点击确定
        Constant.driverH.findElement(By.xpath("/html/body/div[4]/div[1]/a[2]")).click();
    }
    @Then("^h验证加价金额:(\\d+)$")
    public void h验证加价金额(int addPrice) throws Throwable {
        Assert.assertTrue(
         Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/div[1]/div/div[2]/span[2]")).getText().contains(addPrice+"")
        );
        Assert.assertTrue(
                Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/div[3]/div/div")).getText().contains(addPrice+"")
        );
    }
    @Then("^h验证里程金额:(\\d+)$")
    public void h验证里程金额(int p) throws Throwable {
        Assert.assertTrue(
                Constant.driverH.findElement(
                        By.xpath("/html/body/div[2]/div[1]/ul[1]/li/span[2]")).getText().equals(p+"元")
        );

    }
    @Then("^h验证订单总额:(\\d+)$")
    public void h验证订单总额(int p) throws Throwable {
        Assert.assertTrue(
                Constant.driverH.findElement(
                        By.xpath("/html/body/div[2]/div[1]/ul[2]/li[1]/span[2]")).getText().equals(p+"元")
        );

    }
    @Then("^h验证您需支付的金额:(\\d+)$")
    public void h验证您需支付的金额(int p) throws Throwable {
        Assert.assertTrue(
                Constant.driverH.findElement(
                        By.xpath("/html/body/div[2]/div[1]/ul[2]/li[2]/span[2]")).getText().equals(p+"元")
        );
     }
    @Then("^h验证续重金额:(\\d+)$")
    public void h验证续重金额(int p) throws Throwable {
        Assert.assertTrue(
                Constant.driverH.findElement(
                        By.xpath("/html/body/div[2]/div[1]/ul[1]/li[2]/span[2]")).getText().equals(p+"元")
        );
    }
    @Then("^h验证夜间费:(\\d+)$")
    public void h验证夜间费(int p) throws Throwable {
        Assert.assertTrue(
                Constant.driverH.findElement(
                        By.xpath("/html/body/div[2]/div[1]/ul[1]/li[3]/span[2]")).getText().equals(p+"元")
        );
    }
    @Then("^h验证加价费:(\\d+)$")
    public void h验证加价费(int p) throws Throwable {
        Assert.assertTrue(
                Constant.driverH.findElement(
                        By.xpath("/html/body/div[2]/div[1]/ul[1]/li[4]/span[2]")).getText().equals(p+"元")
        );
    }
    @And("^h点击加价重推去支付$")
    public void h点击加价重推去支付() throws Throwable {
        Thread.sleep(1000);
        Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/div[3]/button")).click();
    }
    @And("^h填写备注信息:(.+)$")
    public void h填写备注信息(String memo) throws Throwable {
        //再次点击物品类型进入
        Constant.driverH.findElement(
                By.cssSelector("span[class='weight-info goods-type-info']")).click();
        //写入备注信息
       Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/div/textarea")).sendKeys(memo);
       //点击 确定
       Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div/button")).click();
        //回到下单页后，下拉滚动条，便于其他元素全部显示出来，为后续操作提供方便  (拉到 ‘我要加价’出现)
        CommonTools.scrollToElement(Constant.driverH,By.cssSelector("span.text-mess"));

    }
    @And("^h点击再下一单$")
    public void h点击再下一单() throws Throwable {
        Thread.sleep(1000);
//        Constant.driverH.findElement(By.xpath("//*[@id=\"body\"]/div/ul/li[1]/div/div[2]/a")).click();
        Constant.driverH.findElement(By.linkText("再下一单")).click();
    }
    @And("^h点击物品重量$")
    public void h点击物品重量() throws Throwable {
        Thread.sleep(1000);
        Constant.driverH.findElement(By.cssSelector("span[class='weight-info']")).click();
    }
    @When("^h点击立即注册$")
    public void h点击立即注册() throws Throwable {
        Constant.driverH.findElement(By.linkText("立即注册")).click();
    }
    @And("^h输入注册账户:(.+)$")
    public void h输入注册账户(String tel) throws Throwable {
        if(tel.equals("空格")){
            tel=" ";
        }else if(tel.equals("空")){
            tel="";
        }
         Constant.driverH.findElement(
                 By.className("input-field")).sendKeys(tel);
    }
    @And("^h点击注册$")
    public void h点击注册() throws Throwable {
        Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/div/div/button")).click();
    }

    @And("^h点击返回:(\\d+)$")
    public void h点击返回(int i) throws Throwable {
        CommonTools.back(Constant.driverH,i);
    }
    @And("^h刷新页面$")
    public void h刷新页面() throws Throwable {
        Constant.driverH.navigate().refresh();
    }

    @And("^h点击订单列表标题:(.+)$")
    public void h点击订单列表标题(String title) throws Throwable {
        Thread.sleep(2000);
        Constant.driverH.findElement(By.linkText(title)).click();
    }
    @And("^h进入订单进度$")
    public void h进入订单进度() throws Throwable {
        Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/div[2]/div[1]/a[1]/span")).click();
    }
    @And("^h订单详情中点击订单总价详情$")
    public void h订单详情中点击订单总价详情() throws Throwable {
        Constant.driverH.findElement(By.xpath("//*[@id=\"iss-app\"]/div/div[2]/div[2]/div[1]/div[3]/div[5]/div/div[1]/div[1]/span[3]")).click();
    }
    @Then("^h验证订单详情中里程金额:(.+)$")
    public void h验证订单详情中里程金额(String price) throws Throwable {
        String p =Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div[2]/div[2]/div[1]/div[3]/div[5]/div/div[1]/div[2]/div/span[2]")).getText().trim();
        Assert.assertTrue(p.equals(price));
    }
    @Then("^h验证订单详情中加价费:(.+)$")
    public void h验证订单详情中加价费(String price) throws Throwable {
        String p =Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div[2]/div[2]/div[1]/div[3]/div[5]/div/div[1]/div[2]/div[2]/span[2]")).getText().trim();
        Assert.assertTrue(p.equals(price));
    }
    @Then("^h验证订单详情中续重金额:(.+)$")
    public void h验证订单详情中续重金额(String price) throws Throwable {
        String p =Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div[2]/div[2]/div[1]/div[3]/div[5]/div/div[1]/div[2]/div[2]/span[2]")).getText().trim();
        Assert.assertTrue(p.equals(price));
    }
    @Then("^h验证订单详情中夜间费:(.+)$")
    public void h验证订单详情中夜间费(String price) throws Throwable {
        String p =Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div[2]/div[2]/div[1]/div[3]/div[5]/div/div[1]/div[2]/div[3]/span[2]")).getText().trim();
        Assert.assertTrue(p.equals(price));
    }
    @Then("^h验证订单详情中加价金额:(.+)$")
    public void h验证订单详情中加价金额(String price) throws Throwable {
        String p =Constant.driverH.findElement(
                By.xpath("//*[@id=\"iss-app\"]/div/div[2]/div[2]/div[1]/div[3]/div[5]/div/div[1]/div[2]/div[4]/span[2]")).getText();
        Assert.assertTrue(p.equals(price));
    }
    @When("^h点击关闭图标$")
    public void h点击关闭图标() throws Throwable {
        Constant.driverH.findElement(
                By.cssSelector("div.close-btn")).click();
    }
    @Then("^h验证提示信息:(.+)$")
    public void h验证提示信息(String inf) throws Throwable {
        String s="";
       if( CommonTools.isElementExist(Constant.driverH,By.cssSelector("div.iss-toast"))){
           s=Constant.driverH.findElement(
                   By.cssSelector("div.iss-toast")).getText();
//           System.out.println("aaa"+s);
       }
        Assert.assertTrue(s.contains(inf));
    }
    @Then("^h下单页验证寄件信息:(.+)：(.+)$")
    public void h下单页验证寄件信息(String inf,String phone) throws Throwable {
       String s=Constant.driverH.findElement(
               By.cssSelector("div.address-mess.from-addr")).getText();
        s = s.replaceAll("\\s*|\t|\r|\n", "");
//        System.out.println("寄件信息"+s);
        Assert.assertTrue(s.equals(inf+"BC666Benchi"+phone));
    }
    @Then("^h下单页验证收件信息:(.+)：(.+)$")
    public void h下单页验证收件信息(String inf,String phone) throws Throwable {
        String s=Constant.driverH.findElement(
                By.cssSelector("div.address-mess.to-addr")).getText();
        s = s.replaceAll("\\s*|\t|\r|\n", "");
//        System.out.println("收件信息"+s);
        Assert.assertTrue(s.equals(inf+"BC666Benchi"+phone));
    }
    @Then("^h下单页验证物品类型信息:(.+)$")
    public void h下单页验证物品类型信息(String inf) throws Throwable {
        String s=Constant.driverH.findElement(
                By.cssSelector("span.weight-info.goods-type-info")).getText();
        Assert.assertTrue(s.equals(inf));
    }
    @Then("^h下单页验证物品重量信息:(.+)$")
    public void h下单页验证物品重量信息(String inf) throws Throwable {
        String s=Constant.driverH.findElement(
                By.cssSelector("span[class='weight-info']")).getText();
//        System.out.println("物品重量信息："+s);
        Assert.assertTrue(s.equals(inf+"公斤"));
    }
    @Then("^h下单页验证取件时间:(.+)：(.+)$")
    public void h下单页验证取件时间(String date,String hour) throws Throwable {
        //1 设置取件时间(今天or明天)
        String mydate=CommonTools.getDate(date);
        String s=Constant.driverH.findElement(
                By.cssSelector("span[class='fetch-time-input']")).getText();
//        System.out.println("下单页验证取件时间:"+s);
//        System.out.println("下单页验证取件时间:"+mydate+" "+hour);
        Assert.assertTrue(s.contains(mydate+" "+hour));
    }
    @Then("^h去支付页验证寄件信息:(.+)：(.+)$")
    public void h去支付页验证寄件信息(String inf,String phone) throws Throwable {
        String s=Constant.driverH.findElement(
                By.cssSelector("p.icon-loc-from.pay-info-item")).getText();
        s = s.replaceAll("\\s*|\t|\r|\n", "");
//        System.out.println("寄件信息"+s);
        Assert.assertTrue(s.contains(inf));
        Assert.assertTrue(s.contains("BC666"));
        Assert.assertTrue(s.contains("Benchi,"+phone));
    }
    @Then("^h去支付页验证收件信息:(.+)：(.+)$")
    public void h去支付页验证收件信息(String inf,String phone) throws Throwable {
        String s=Constant.driverH.findElement(
                By.cssSelector("p.icon-loc-to.pay-info-item")).getText();
        s = s.replaceAll("\\s*|\t|\r|\n", "");
//        System.out.println("寄件信息"+s);
        Assert.assertTrue(s.contains(inf));
        Assert.assertTrue(s.contains("BC666"));
        Assert.assertTrue(s.contains("Benchi,"+phone));
    }

    @Then("^h去支付页验证取件时间:(.+)：(.+)$")
    public void h去支付页验证取件时间(String date,String hour) throws Throwable {
        //1 设置取件时间(今天or明天)
        String mydate=CommonTools.getDate(date);
        String s=Constant.driverH.findElement(
                By.cssSelector("p[class='icon-pick-time pay-info-item']")).getText();
//        System.out.println("下单页验证取件时间:"+s);
//        System.out.println("下单页验证取件时间:"+mydate+" "+hour);
        Assert.assertTrue(s.contains(mydate+" "+hour));
    }
    @Then("^h去支付页验证物品类型信息:(.+)$")
    public void h去支付页验证物品类型信息(String inf) throws Throwable {
        String s=Constant.driverH.findElement(
                By.cssSelector("p.icon-item-name.pay-info-item")).getText();
        Assert.assertTrue(s.equals(inf));
    }

}
